package com.woniuxy.controller;

import com.woniuxy.service.TakeawayManService;
import com.woniuxy.util.ResponseData;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.web.bind.annotation.*;

/**
 * @BelongsProject: pigTrotterStore
 * @BelongsPackage: com.woniuxy.controller
 * @Author: Quan
 * @Date: 2025/3/18 20:57
 */
@RestController
@RequestMapping("/takeawayMan")
@AllArgsConstructor
public class TakeawayManController {
	private TakeawayManService takeawayManService;

	/** 
	 * @Description: 根据前端传来数据查询，否则查询全部
	 * @Param: [nameOrPhone]
	 * @return: com.woniuxy.util.ResponseData<?>
	 * @Author: Quan
	 * @Date: 2025/3/18
	 */
	@GetMapping("/queryInfo/{nameOrPhone}")
	public ResponseData<?> queryInfo(@PathVariable("nameOrPhone") String nameOrPhone) {
		return takeawayManService.queryInfo(nameOrPhone);
	}

	@GetMapping("/queryAll")
	public ResponseData<?> queryAll() {
		return takeawayManService.queryAll();
	}
}
